package com.vision.bigDataApi.service.mysql.impl;

import com.vision.bigDataApi.mapper.mysql.UserMapper;
import com.vision.bigDataApi.model.InterfaceInfo;
import com.vision.bigDataApi.model.User;
import com.vision.bigDataApi.service.mysql.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getByUsername(String userName) {
        return userMapper.getByUsername(userName);
    }

    @Override
    public List<HashMap<String, Object>> getByInterfaceInfoAndTabelInfo(int iId) {
        return userMapper.getByInterfaceInfoAndTabelInfo(iId);
    }

    @Override
    public int insertLogInterface(Map map) {
        return userMapper.insertLogInterface(map);
    }

    @Override
    public List<Map<String, Object>> getByLogInterfaceInfo() {
        return userMapper.getByLogInterfaceInfo();
    }

    @Override
    public List<Map<String, Object>> getByLogInterfaceStat(Integer interfaceId) {
        return userMapper.getByLogInterfaceStat(interfaceId);
    }

    @Override
    public List<InterfaceInfo> getByInterfaceInfo(String interfaceName) {
        return userMapper.getByInterfaceInfo(interfaceName);
    }
}
